<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>比较最大值</title>
</head>
<body>
    <script>
        function getMax(n1,n2){
            return Math.max(n1,n2);
        }
        function getMax1(a,b,c){
            return Math.max(a,Math.max(b,c));
        }
        console.log("6.98和6.99相比"+'\n'+getMax(6.98,6.99)+"最大");
        console.log("40、70、10相比"+'\n'+getMax1(40,70,10)+"最大");
    </script>
</body>
</html>